package com.menu.Controller;

import com.menu.Service.DohService;
import com.menu.Utils.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@Api(tags = "菜谱浏览量接口")
@RequestMapping
public class DohController {

    @Resource
    DohService dohService;


    @ApiOperation(value = "浏览菜谱功能")
    @ApiImplicitParams(
            {
                    @ApiImplicitParam(name = "userId", value = "用户id", required = true),
                    @ApiImplicitParam(name = "menuId", value = "食谱id", required = true)
            }
    )
    @PostMapping("/addDoh")
    public ResponseResult addDoh(Integer userId, Integer menuId){
        return dohService.addDoh(userId,menuId);
    }
}
